issue #1022 fix deadlocks by taking lock on experiment table