Catch exception thrown by an empty StyleSpansBuilder.
Merge origin/master