[FIX] Handle tail calls correctly in built in higher-order functions.