[bug 1110653] Avoid db deadlocks when updating events.