Fixed a bug with parsing compound if/foreach.