[AC21.4] Fix stack overflow in mapconcat