Cannot create a session after the response has been committed Problem

This was happening only on Tomcat so we added Tomcat based integration test to the test suite.
good catch!... it is done.