remap_fields() is actually buggy in 2.x -- copying from 3.x