Fix weird bug on windows php

On menu Lists/branches
The original code works perfectly on linux but when run on windows, one surname (that I've found) in my data produces the following error "Fatal error: Nesting level too deep - recursive dependency? in <path>\library\WT\Controller\Branches.php on line 151".

I couldn't see anything wrong - the recursion level wasn't particularly deep - but I did notice the $ancestors array was holding a huge amount of data - a complete WT_Individual record for each entry - I figured that as we're only looking for something unique the Xref would do and by making this change the code now runs in windows as well. 

Weird or what?