diff --git a/module/VuFind/src/VuFind/Controller/HierarchyController.php b/module/VuFind/src/VuFind/Controller/HierarchyController.php
index be65a4bbe6502d15e51e533caf969980fb825b6b..5aa8822f01ff7c22b4c1010deb6ec469d0354416 100644
--- a/module/VuFind/src/VuFind/Controller/HierarchyController.php
+++ b/module/VuFind/src/VuFind/Controller/HierarchyController.php
@@ -124,7 +124,7 @@ class HierarchyController extends AbstractBase
         $id = $this->params()->fromQuery('id');
         $source = $this->params()
             ->fromQuery('hierarchySource', DEFAULT_SEARCH_BACKEND);
-        $loader = $this->serviceLocator->get(\VuFind\Record\Loader::class);
+        $loader = $this->getRecordLoader();
         try {
             if ($recordDriver = $loader->load($id, $source)) {
                 $results = $recordDriver->getHierarchyDriver()->render(
@@ -159,7 +159,7 @@ class HierarchyController extends AbstractBase
         $id = $this->params()->fromQuery('id');
         $source = $this->params()
             ->fromQuery('hierarchySource', DEFAULT_SEARCH_BACKEND);
-        $loader = $this->serviceLocator->get(\VuFind\Record\Loader::class);
+        $loader = $this->getRecordLoader();
         try {
             if ($recordDriver = $loader->load($id, $source)) {
                 $results = $recordDriver->getHierarchyDriver()
@@ -191,7 +191,7 @@ class HierarchyController extends AbstractBase
         $id = $this->params()->fromQuery('id');
         $source = $this->params()
             ->fromQuery('hierarchySource', DEFAULT_SEARCH_BACKEND);
-        $loader = $this->serviceLocator->get(\VuFind\Record\Loader::class);
+        $loader = $this->getRecordLoader();
         try {
             $record = $loader->load($id, $source);
             $result = $this->getViewRenderer()->record($record)