diff --git a/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp b/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp
index 6fb41a4ed7283558c79ab592dcf788f786a76632..7e2fadebf1c8bf721db28db54f496265b40cbd10 100755
--- a/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp
+++ b/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 //====================================================================
@@ -621,6 +621,13 @@ DbStatus RootTreeContainer::open( const DbDatabase& dbH,
                    }
                    dsc = BranchDesc(cl, pBranch, leaf, cl->New(), c);
                    dsc.aux_reader = RootAuxDynIO::getReaderForBranch(pBranch);
+                   if (dsc.aux_reader) {
+                     // If we set up a reader, then disable aging
+                     // for this file.  That will prevent POOL from
+                     // deleting the file while we still have
+                     // references to its branches.
+                     dbH.setAge (-10);
+                   }
                    break;
                 case DbColumn::CHAR:
                 case DbColumn::UCHAR:
diff --git a/Database/APR/StorageSvc/src/DbDatabaseObj.cpp b/Database/APR/StorageSvc/src/DbDatabaseObj.cpp
index 162ffae49bd2b749051c3d6e3da85815bf730702..4e61518d7a49aaa03f2348475a3afec5dc1ceec7 100644
--- a/Database/APR/StorageSvc/src/DbDatabaseObj.cpp
+++ b/Database/APR/StorageSvc/src/DbDatabaseObj.cpp
@@ -884,7 +884,7 @@ void DbDatabaseObj::setAge(int value) {
   if ( 0 == m_info )  {
     m_fileAge = 0;
   }
-  else  {
+  else if (m_fileAge >= 0) {
     switch ( value )  {
     case 0:
       m_fileAge = 0;