Fixed bug with `*` selector first in the group. Closes #1161