Added test: proper tail calls