Allow TrySetApartmentState to set the same state multiple times.

License: This patch is under the MIT/X11 license.