Fix behavior of TVS_SINGLEEXPAND style broken in Corel merge. Optimize