Fix some task visibility logic.