rebase: correctly finish rebasing detached heads When rebasing with IDs, we do not return to the `branch`, we remain in a detached HEAD state.