warn if duplicate attribute - closes #2508
drop useless template usage for has_key