Restore most-recent return code match in if()/elsif()

This puts the old behaviour back of matching the most recent
return code, not the highest priority one.
Merge pull request #451 from philmayers/fix-if-modreturn

Restore most-recent return code match in if()/elsif()