diff --git a/src/RemoteTagCache.cxx b/src/RemoteTagCache.cxx
index 362683445..283ebf01f 100644
--- a/src/RemoteTagCache.cxx
+++ b/src/RemoteTagCache.cxx
@@ -83,8 +83,7 @@ RemoteTagCache::InvokeHandlers() noexcept
 	const std::scoped_lock<Mutex> lock(mutex);
 
 	while (!invoke_list.empty()) {
-		auto &item = invoke_list.front();
-		invoke_list.pop_front();
+		auto &item = invoke_list.pop_front();
 		idle_list.push_back(item);
 
 		const ScopeUnlock unlock(mutex);
@@ -93,8 +92,7 @@ RemoteTagCache::InvokeHandlers() noexcept
 
 	/* evict items if there are too many */
 	while (map.size() > MAX_SIZE && !idle_list.empty()) {
-		auto *item = &idle_list.front();
-		idle_list.pop_front();
+		auto *item = &idle_list.pop_front();
 		map.erase(map.iterator_to(*item));
 		delete item;
 	}