WIP[substitutions] Fixes substitutions in the compiler pass

@catchamonkey