Since this commit, Alloy's selective compilation is broken since the Resources's alloy.js file gets replaced each and every time the alloy compile command is called.
Instead, the fix should look if there's a file restriction, and not replace alloy.js if this restriction does not affect this file.
This is particularly problematic when using some compilation watcher (aka. tishadow + grunt-tishadow), which look for changes in the Resources folder to re-launch the app. With the current change, the app will be refreshed using a template-based alloy.js file (not a recompiled one).