(#10506) Don't allow "class" as name of class or define

class is a reserved word and according to the documentation it should
not be allowed as name for a class or defined type.

This does not close the bug entirely, just fixes one part of it.