As suggested in parent change, return a list of `TrackType` instead of appending to it. This has the slight disadvantage of iterating twice over the (short) list, but clarifies the code. PiperOrigin-RevId: 402844458