Add missing relation between Attribute and AttributeValue

Fix issue #1480 and #1372