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