Fixed a bug that could generate infinite tasks.

If a behavior was discovered to be unreachable during the required
conditions check, it never marked the golem that tried as invalid. This
could cause it to think that it's invalid list still has a chance, and
re-queue the task incorrectly.