I'm not sure this is wrong, but it makes me nervous.  Previously, we only made contexts when a project was opened and the compact was that the context always had a non null reference to the project.