Fixed compilation, but deduplication is a bit screwed.
Fix logging error in locking.