Fix query on processing inbox migration.