diff --git a/Control/AthenaConfiguration/python/AthConfigFlags.py b/Control/AthenaConfiguration/python/AthConfigFlags.py
index 7e7096bdb970015f3e3ab2ccd43d1d63efcf26d3..ce871ec00752982c083cf6c2ec53fe423a3054fc 100644
--- a/Control/AthenaConfiguration/python/AthConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AthConfigFlags.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 
 from copy import copy, deepcopy
 from difflib import get_close_matches
@@ -201,7 +201,10 @@ class FlagAddress(object):
         json or yaml.
 
         """
-        return _asdict(self._subflag_itr())[self._name]
+        d = _asdict(self._subflag_itr())
+        for k in self._name.split ('.'):
+            d = d[k]
+        return d
 
 
 class AthConfigFlags(object):
diff --git a/Control/AthenaConfiguration/test/testAthConfigFlags.py b/Control/AthenaConfiguration/test/testAthConfigFlags.py
index 525660cbfee6e47a89574a9c8e8e4c15479e7747..5ec3fb3a92066139fb216fbd4bda5182df0fe2ef 100755
--- a/Control/AthenaConfiguration/test/testAthConfigFlags.py
+++ b/Control/AthenaConfiguration/test/testAthConfigFlags.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
 
 from AthenaConfiguration.AthConfigFlags import AthConfigFlags, isGaudiEnv
 from AthenaConfiguration.Enums import Format
@@ -169,6 +169,8 @@ class BasicTests(FlagsSetup):
         self.assertEqual(self.flags.A.B.C, adict['B']['C'])
         full_dict = self.flags.asdict()
         self.assertEqual(self.flags.A.B.C, full_dict['A']['B']['C'])
+        bdict = self.flags.A.B.asdict()
+        self.assertEqual(self.flags.A.B.C, bdict['C'])
 
     def test_iterator(self):
         self.assertTrue('A' in self.flags)