Fix possible oob when trying to erase an element. Please review and signoff for merging into 3.4.1<br><br><br>