Fix bug 1066980: relax matching conditions for secondary groups in scala...

...ble app