[FIXED JENKINS-18804] Fixed NPE on TriggeredBuildSelector when the upstream is removed.