The default derive path (index) should be calculated from hardware keys only.
Example:
You have 3 keys in the hot wallet and 1 imported from Ledger.
At the moment it will propose to import key 4.
But it should propose 1.
Before signing transaction on Ledger — check that the public key is the same or display error "You are using different the different hardware wallet, so the public key does not match".
There are two things to do:
4
. But it should propose1
.