Fix for Bug #36403. The problem is similar to the row backtracking that has to be done in case of spanned rows but it has to be handled a little differently.