diff --git a/html/inc/util.inc b/html/inc/util.inc
index d5a3e28e9c..14d22c2569 100644
--- a/html/inc/util.inc
+++ b/html/inc/util.inc
@@ -243,6 +243,10 @@ function page_head(
global $caching, $cache_control_extra, $did_page_head;
global $is_login_page, $fixed_navbar;
+ if ($did_page_head) {
+ return;
+ }
+
$did_page_head = true;
$url_base = url_base();