When performing an Advanced Search for a payment with the type 'Creditor', 'Debtor' or 'Ledger', the wrong data was sometimes shown

When performing an Advanced Search for a payment with the type 'Creditor', 'Debtor' or 'Ledger', the wrong data was sometimes shown.