Fix double free problem without becoming a RAM hog

Optimize findInTree's branches based on euler/prob7.ff
    performance. This is likely because builtins tend towards the left
    of the tree while frequently accessed user-defined variables will
    tend towards the right of the tree.