<!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->
Describe the issue
Last year, I made transactions from 1-addresses to P2SH 3-addresses generated from a different address than the sending address, but within the same wallet. Now, in another wallet.dat with the same keys, the old (empty) 1-addresses with no balance read as inputs in the spend window coin selection section, underneath them is the P2SH address that received the funds. This is very confusing. As this is a backup wallet, it seems to lump together the 'sent from' address with the receiving P2SH address.
edit: when expanding on the inputs in tree-mode, I do see the 3-addresses as inputs.
What behavior did you expect?
Have the Bitcoin client automatically read the address which the P2SH address was generated from in the coin spend section, since the client reads it received funds on there, even though it was sent to a generated P2SH address.
What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)?
Bitcoin Core 14.2 / 16.0 binaries linux.
What type of machine are you observing the error on (OS/CPU and disk type)?
Ubuntu 14.04