Revert assertions in compiler spec to strict array equality
Localise variables for readability, since they were only used in one place
Merge pull request #1120 from Sinjo/fix_test_assertions

Fix test assertions which were made weaker