I came across a bug in the remap function in domain.cpp.
it produces wrong image flags in the Z direction only when remapping atoms in the box when reading data file without img flags.
line 426 in domain.cpp (remap function) reads "idim--;" and I think it should be "idim++;"
at least for me it seems to fix the problem.
hope you won't have to throw away data!