Couldn't we just get away with the `src_id < len(sources)` part? That'd implicitly cover the `0 <=` case and be less confusing.