Just an idea for posterity, or a potential improvement for this PR:

```
// I personally don't like skimping on var names, even for loop vars
for (SlaveTemplate template : templates) {
    // this case can obviously be ruled out
    if (label == null && template.getMode() == Node.Mode.EXCLUSIVE) {
        continue;
    }
    // In either case with the original logic, you want label.matches(template.getLabelSet())
    // the only time when it's ok for the template set to not match the label is if there is no label
    // AND the node is in NORMAL mode
    if ((label == null && Node.Mode.NORMAL) || label.matches(template.getLabelSet())) {
        return template;
    }
}

return null;
```

Main goal is to remove the embedded `if | else if` statements.