Fix bug in failing on empty test_command

I switched the order of these two because there's a race condition wherein the build state could get updated from errored to partitioning.