BaseScheduler.addBuildsetForChanges() calls getDefaultCodebase() while iterating over self.codebases so this should be safe.