bip44 account discovery
In terms of "Accounts discovery" algorithm, it is not needed to get internal addresses. We just sequentially take receiver addresses of an account and check whether one of them was used in any transaction. Literally: we get a transaction and check whether receiver address is in the set of target addresses of looking transaction.

This is so because if there is a change address in the transaction then there is a receiver address mandatory. It allows us to skip checking of change addresses for this task.