I think any code that's posted in public should be considered free to use by anyone for anything and its corresponding license be ignored and invalid. If you want restrictions on how people use your code, don't post it publicly, or have a proprietary portion that's required for compilation