Fix for GRAILS-9912 Buffer allocation bug in StreamCharBuffer