Pulled more duplicated code into single copy in AbstractCollectionAttribute.