GRAILS-11513 improve previous fix: use optimized way for writing CharSequences to Writer