Checks that every rule has a unique name.