Do not enforce required attributes if attributecollection is supplied.

Fix issue where an error was showing if "attributecollection" was used.