SI-7148 don't optimize impl classes away in parser

That's not a proper fix, since it removes the optimization altogether
instead of doing it later.