Fix and test var edge cases for zero and one-element iterables

We should make sure that this is the behavior we want, but at least it's consistent.