How about rewriting `getContainingSegment` to start out by calling `getSegmentById`, so this logic is hidden inside the SMIL document class?