Fixed problem with 'git rebase' on Travis CI

Somehow, if running 'git rebase' on Travis CI (and only on
Travis CI), we get a detached head, what makes
returning_to_current_branch fail.
I was not able to reproduce this problem on any other computer I
have access to. The *exactly same code* fails on Travis CI, but
works on my Windows computer, on Debian and on OpenSuse...