this does not fix the underlying problem that once in this state you cant exit editmode, only that the layer key bindings dont let the state come about. Looked into fixing properly but its not so simple since currently object mode operators all use "active_object" which is supposed not to be set when in a hidden layer.