move the code for non-attribute-index classes up the function, bail out
quickly