Return a 2 arg function for the task callback to work better with libraries that perform arg length sniffing