Fix failure to swap args when applying mappings