Bugfix for double-attribute creation at the bottom of a type-diamond.

Added a test to verify attribute creation according to type inheritance.