Additional thread safety fixes

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.