For what I imagine are the very few people who have written extensions that save their state into sessions and that restore their own models from sessions, you should know that I have added a variable to the SimpleSession module named "modelOffset". During a normal session restore, modelOffset is zero. During a session restore where pre-existing models haven't been closed (i.e. the session is being "merged" with the current models) modelOffset is a positive integer that should be added to restored model IDs (not sub-IDs) to avoid collision with currently-open models. This is explained in further detail in the Programmer's Guide example for sessions: