More rebase fixes

@fabianofranz 

Please do not merge without confirmation, this is my WIP branch, it might change, squash, run or explode any time :-)