Forbid type parameters in inner statics

Closes #9186