NXP-12342: do not try to reconnect documents if we don't have a CoreSession
NXP-12342: put the whole detached document in the context instead of its id