bz19893: fix AttributeError in migration code