Fixed some attempts to modify ActiveRecord::Relation

These records were being modified in-place and the rows array
was not being used. Simple fix and tests pass.