Fixes #2001

Fixes a regression when a mixin guard can't see the mixin parameter variables in certain cases (#2001, #1920).