AURORA-126: Fix regression causing secondary index to store duplicate tasks.

Bugs closed: AURORA-126

Reviewed at https://reviews.apache.org/r/17432/