checkout -b <name>: correctly detect existing branch