Remove a little repetition from PathTreeBuilderImpl