Prevent buffer leak if ServletPrintWriter.close() is called twice