Raise SessionClosedError when attribute access is attempted outside an active session.