fix dropped-position-indices in merge-range
debug messages and error-checking