Refactor inverse context entry creation.