calling tenant_context when there is no previous tenant no longer results in exception. added regression test