MB-12961 fix bugs in sequence iteration with snapshots

Fixes several bugs that can cause crashes if sequence iteration
is attempted over snapshot handles.
Incorrect offset was used to fetch an element from an avl node

Change-Id: I372dfff0819b7194dc4b7c40806a8c10703ad520