Fixes crash when illegal function definitions are deleted or defaulted.  Fixes PR14577.