After git rebase -i, HEAD is left in the wrong place, seemingly losing commits. This is caused by sh(1) misbehaving when a dot command is executed in a function and the dot command contains a return that is supposed to return from the dot command. See PR bin/48843.