fix bug in siftUp() [from upstream]