Fix issue with $key not being passed to AggregatePropertySerializer::serialize() and not checking appliesTo first before is_array