Restrict rank from multiple repeat group

@marady_168, in that case maybe try this workaround discussed previously: