Another, less strict way to be protected from stack overflow caused by recursion