fix #38811
fix #39341: crash on tab entry
Merge pull request #1458 from MarcSabatella/39341-setpos-recursion

fix #39341: crash on tab entry