The essence of the append infinite loop thread

Yes, and this is why it is so easy to let it run away. As in this example of a class of mistakes I have done many times:

?- length(L, N), N =< 3.

written with the intent of “I want lists up to three elements long”.