Emptied a filtered deck, now cards in it that weren't reviewed are not in any deck?

Oddly, after emptying a filtered deck created by a custom session, some of the cards did not return to their original parent. Instead, they are listed as having “no deck”, like this:

What is going on here? It might have something to do with the fact that I emptied the deck in AnkiDroid, because everything looks fine there; how can I go about fixing it in the desktop client?

Please see When problems occur - Frequently Asked Questions