Multi-threaded access to a session is not supported. Even if the change you suggest is made, something else would break.
Can you reproduce this using a single thread?