Update class lists after removing/adding iterations to the DOM

This makes the "should mark a newly added and newly selected object as selected" spec pass.