CoreThumbnailer: Fix potential lock inversion

Fix #136
4 jobs for fix_data_race in 22 minutes and 58 seconds (queued for 1 second)