Replace the dangling context hotfix with an assertion.