Preallocation routine will now correctly get next tree node during resource search