GROOVY-5865: getAt(EmptyRange) not called when passing an EmptyRange to getAt(Collection) (minor refactor)