diff --git a/context_blockcache_alter.inc b/context_blockcache_alter.inc
index 5262296..4c62673 100644
--- a/context_blockcache_alter.inc
+++ b/context_blockcache_alter.inc
@@ -43,7 +43,14 @@ function _context_blockcache_alter_build_block($block, $reset = FALSE) {
     // Only query for custom block title if block core compatibility is enabled.
     if (!variable_get('context_reaction_block_disable_core', FALSE)) {
       global $user, $theme_key;
-      $block->title = db_result(db_query("SELECT title FROM {blocks} WHERE module = '%s' AND delta = '%s' AND theme = '%s'", $block->module, $block->delta, $theme_key));
+      static $block_titles = array();
+      if (!isset($block_titles[$block->module][$block->delta])) {
+        $result = db_query("SELECT module, delta, title FROM {blocks} WHERE theme = '%s'", $theme_key);
+        while ($row = db_fetch_object($result)) {
+          $block_titles[$row->module][$row->delta] = $row->title;
+        }
+      }
+      $block->title = $block_titles[$module][$delta];
     }
     // Override default block title if a custom display title is present.
     if (!empty($block->title)) {
