Fix for Issue #222. Code change + new test added to verify proper behavior

Reverted some changes back to like they were a long while back so that $idx/$len are not disturbed by a section over an object. Only sections on arrays will change these values. New test added to verify $idx/$len values remain intact when iterating a section and it's body is a section on an object.