consistent setindex shape checking using new rule

also reduce duplication of the related error messages