Issue #2120205 by mikeryan: Fix bug when upgrading lastimported from D6 to D7