I'm testing self-payments and there is an edge case with the following setup:
A (phone) <- channel1 -> B (LND) <- channel2 -> A.
Sometimes payment may arrive via
A - channel1 -> B - channel1 -> A
even though a B - channel2 -> A route was proposed.
I know LN nodes are allowed to choose a different channel if they think it's a better fit, but looks like LND does not check that a channel it chooses may simultaneously be a channel it got a payment from?
The testnet peer is https://1ml.com/testnet/node/02ae2f22b02375e3e9b4b4a2db4f12e1b50752b4062dbefd6e01332acdaf680379