Import of r39909 from trunk. Protection for opening paren at final character: "a(b(" and moving cursor to left was crashing ROOT.
Changed paths: