Fixed an exception raised in the master related to task statuses.

Review: https://reviews.apache.org/r/16038