Fix to prevent infinite recursion on DCG phrases in safe/5.