Correctly initialize the `Session` class (see #6747)