improve definition of uniqueness rules for #843