deleteRecordAsync does not delete secondary index

Hi everyone! I see an issue using Record Layer and do not know how could I fix it properly.

I scan in a given recordStore by secondary index (let’s call it expiration_timestamp) and getting primary keys that using later in deleteRecordAsync. deleteRecordAsync returns false for some pKeys. I check and looks like there is a number of indexes that referring to nonexistent records.
First of all, I’m not sure how could it happen, as I understand that deleteRecord should delete both the record itself and related index(indexes), but some records have been deleted and related indexes are still there.

So the question is how to delete invalid indexes using record layer? And how to prevent such cases in a first place? I do appreciate if someone could help with this case.

Thanks in advance,
Sergey