Fix feasibleTree

Under some circumstances feasibleTree would yield incorrect rankings.
This change adds a test for a known failing input and fixes the code.

Fixes #103