Fix for bug 35940 Some more checks in order to remove all the elements representing trailing spaces at the end of a paragraph