Re-writing range counter since it was completely wrong. Also suppressing left-mapping.
Adding more Scala tests to try to work out what's going on, but Scala tests don't see this strange lack of 0s in the range vector.