Additional thread safety fixes v5_34_21

This should fix the periodic crashes seen in the CMSSW_7_3_THREADED_X IBs. Additionally, we should get exceptions if a similar problem occurs later on.
This is the same fix as #33 but for ROOT 5-34-21.