[JENKINS-18978] - Modified filtering of permission groups for the slaves.

Resolves: https://issues.jenkins-ci.org/browse/JENKINS-18978

Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>