The reason I ran into the issue in the first place was that I changed the .data() behavior to store a flag in private data stopping it from scanning all the data- attribs more than once. Then a bunch of unit tests broke becuase it was using the jQuery.expando key on the .data() -- Basically, anytime you wanted to for ... in the .data() you're going to need to "ignore" the "private" data....