Extra small improvement to context switching, to make it truly robust