JENKINS-24392 Fix for manual triggers in folders

https://issues.jenkins-ci.org/browse/JENKINS-24392