Tests for #223
Fix #223 with runtime check
Add metamodel info to attributes for #196