Issue #2245039 by klausi: Implemented exception handling for required contexts that are missing.