I wrote this solution as a CLI application in Java. It worked, but only on problems requiring 12 moves or less. If the amount of required moves went past that, it would enter a deadlock. After copypasting the code to a new C# project, adding some visual bling and changing the syntax, everything seems to work fine.
Then I tried implementing my own BinaryTree-class, and now the Java version works as well. I've probably
misunderstood how you're supposed to use the one written by