diff --git a/trac/config.py b/trac/config.py
--- a/trac/config.py
+++ b/trac/config.py
@@ -145,6 +145,7 @@
         while parent:
             sections |= set(parent.parser.sections())
             parent = parent.parent
+        sections.update(self.defaults().keys())
         return sorted(sections)
 
     def has_option(self, section, option):
@@ -254,6 +255,8 @@
             return True
         if self.config.parent:
             return name in self.config.parent[self.name]
+        if Option.registry.has_key((self.name, name)):
+            return True
         return False
 
     def __iter__(self):
@@ -266,6 +269,9 @@
             for option in self.config.parent[self.name]:
                 if option.lower() not in options:
                     yield option
+        for section, option in Option.registry.keys():
+            if section == self.name and option.lower() not in options:
+                yield option
 
     def __repr__(self):
         return '<Section [%s]>' % (self.name)

