Deck's CardMapper::findAllByStack() filters on stack_id and archived only -- there is no deleted_at condition -- so getActiveCardsInStack() also returned cards the user had deleted. They stay in the table until Deck's DeleteCron purges them, which is long enough for an overdue one to get moved out of the trash and back into a stack.