Fixed #4624 (Wrong error for instances of std::unique_lock (variable is never used))