Fix for JENKINS-24999

This change fix JENKINS-24999.

To reproduce this issue you need to:

- Create two jobs using the same BitBucket repo
- Only in one of them check "Build when a change is pushed to BitBucket"

Result: Both jobs are triggered even if you only checked the "Build when a change is pushed to BitBucket" option in one of them.