Removed unused variable from `rewriteLeaf`.