Bugfixes for fail_missing_assignments()

fail_missing_assignments() had bugs that would lead to it marking tasks
as failed that were not failed. This fixes that.