Throw an error if the name of an association clashes with an attribute. Closes #1272