VmemThumbnailer: Fix potential lock inversion

5 jobs for sqlite_load_test in 33 minutes and 25 seconds (queued for 8 seconds)