Wrong exception used after switch to older phpparser