Correctly use groups parameter only when its not empty

Fix #9745