A star is not working right

It solves simple pathfinding problems, but breaks itself over more
complex ones, and I cannot workout why it bloats. Any help would be
great. I've implemented printing functions to help visualize the spread
of considered nodes.