Fix `goal_expansion/2 hooks for SWI-Prolog and YAP