fix #8213, map with >2 tuple arguments

Backport of 3ca78cdaae1 for the 0.3-release branch