Fix off-by-one error in storing reusable right-subtree