Add tests for the closed project scenario, and fix another codepath where the same exception could be thrown.