Correctly set Modulo annotations for multi-Image datasets (rebased onto dev_5_0)



This is the same as gh-885 but rebased onto dev_5_0.

----

See gh-874.  This allows each Image to have its own ModuloZ/ModuloC/ModuloT.

/cc @imunro