FIX: issue #947 (Compiler crash on expression with paths on local object)

This fix also applies to similar regressions on compiled EITHER, UNLESS, LOOP, REPEAT and FOREACH.