Merge "add support for displaying log files on standard input"
diff --git a/aos/common/queue_types.cc b/aos/common/queue_types.cc
index f11553f..42dec0c 100644
--- a/aos/common/queue_types.cc
+++ b/aos/common/queue_types.cc
@@ -285,8 +285,12 @@
 
 const MessageType &Get(uint32_t type_id) {
   ::aos::MutexLocker locker(&cache_lock);
-  if (cache.count(type_id) > 0) {
-    return cache.at(type_id).type;
+
+  {
+    const auto cached = cache.find(type_id);
+    if (cached != cache.end()) {
+      return cached->second.type;
+    }
   }
 
   if (aos_core_is_init()) {