add AttributeVisitor
add protection for Reference deep visitor