Rework tree representation as set of reverse paths.