Fix model builder for single-attribute mapping
Fix transformer for empty tuples
Run grouping before wrapping
Get keys for wrap/group transformation just once