fixed parent calculation bug in avl trees

Fixed a bug that effected both AVL trees and AVL index trees where the parent
node was not properly recomputed.