Correctly deal with partially converted datatypes both
during the unpack and during the positioning.

Fixes #4610.