Changed the way equality works in metamodel
Fix problem with Id instead of Common tag when only Id is found
Add DEBUG statements
Fix error in ApplyDef