Get paramID from parameterIndex

I’m using APVTS and managing my parameters by id. Then, APVTS::Listener doesn’t have a callback for gesture changes, so I have to resort to AudioProcessorParameter::Listener, whose callbacks reference parameters by index. Because I’m doing all my management with ids, I need to get the id for a given index. It seems that the only way of doing that is

static_cast<AudioProcessorParameterWithID*>(getParameters()[parameterIndex])->paramID

which is awful. Am I missing something?