Recursive method and memory problems - C#