Project explorer bug fixes for branch changes

(cherry picked from commit 83d97df501eff5771dbd3da7c290aeed0cc04ea0)
Project explorer branch selection tests

(cherry picked from commit ade65259ad244de6b6bec24052f54169dc2205a2)