[FIXED JENKINS-3265] Hotfix for regression in matrix project loading from 25084f5.(cherry picked from commit 3370e6edf5e0e7c7a8cf22e4a7a5decc24c45205)
[JENKINS-17337] Added test for NPE.(cherry picked from commit 1bf958afb196d0c56b37f00681027a549d0c9189)
recording the fix
creating an RC branch