[JENKINS-24694] Whitelisted method to test whether a matrix parent build

[JENKINS-24694] (https://issues.jenkins-ci.org/browse/JENKINS-24694)