Added patch to limit cross thread access to ImmSet* functions.