Fix for #215 and some other related improvements

This cannot be changed here without fixing the `spec/parser.php`, will do.