Fixes another issue related to ancestors in ordered trees. Closes #39