Lock was not held across a replace_{tempo,meter}() operation because of re-use of {remove,add}_{tempo,meter}. Moved functional code into _locked variants so that replace operation can hold lock across its entire active lifetime.
9f842f3