Fix 5.4 bug when doing empty(function())