Add two passes technique to work-around missing DynamicScope feature
Switch to single file workaround