Fix surprising missed optimization in mergefunc where we forgot to consider