Fix Deadlock when taking a snapshot

Introduced in 9f2638e
References #71