fix(helpers.js): Fix bug where pathfinding does not check whether the in...

...itial tile was visited when determing goal states