The image sorting method in DicomSeriesReader tests if the image position of an image is smaller than the position of another image using the "<" operator, which in turn performs a lexicographic comparison of the attribute.
The problem is that I assumed that the image position was a single value, which is not true: image position is a point.
As the direction of the axes is defined fully by the patient's orientation (see http://www.dclunie.com/medical-image-faq/html/part2.html), the correct behavior would be to use the z coordinate if the image was acquired in the axial axis, the x coordinate if it was acquired in the sagital axis, and the y coordinate if the acquisition was in the coronal axis.