Project Explorer bug fixes for changing branch

(cherry picked from commit ad90a93841bb49f8141288138da2ceacd48ed36d)