Better handling of branch merges