Handle nameReference as well as type-based element defs