To assist querying keys in the wallet, the key metadata should keep track of what block height ranges it MAY not know the transactions for.
Upon a full-rescan: all keys should have their 'unscanned' ranges cleared.
Upon 'pruning' a set of translations in a wallet: all related keys in the wallet should be updated with the appropriate 'unscanned' ranges.
If upon opening a wallet the client cannot connect an appropriate hash and rescan (such as when changing wallets on a pruned node). All keys in the wallet should be set to include the unscanned range upto where then node keeps full-blocks (and can rescan from).
The ranges should be conservative so that the wallet can be quite confident that it knows about all the transactions that are not inside the unscanned ranges. The wallet may also know about transactions that are inside the unscanned ranges.
Note: Updated upon @sipa 's comments that the wallets already have implement many similar behaviour to what is described.