Handling more rebase errors

When the rebase fails and we are not in a rebase, then we could end up
in a detached head state.  Go back to our starting point.