This patch fixes a regression introduced in commit 645f572 (When duplicate tasks are selected, only one of those tasks retains selection after a sort, filter, or other operation). Closes Issue #249.