We don't have to check for _display or context here since this is a private function which is never called under such circumstances. This solves problems caused by display.get_context() which was previously removed in e549ae074f.
e549ae074f