Fix extension class declaration support for extension developers

Consumes PR #931 

Avoids the possibility to have extension developers to create classes that extends traits or interfaces.