core: check that primitive types and constructors aren't redefined