The state of the backend needs to be checked before any pending session commands are executed on it. Added debug assertions to catch invalid use of the status functions of closed backends.