Also makes sense to check if the "best task state" has a child state of initial and do nothing in that case.  (Doesn't make sense to overwrite an initial state with another initial state, and some of the logic lower down could mess things up in that case).  Although I don't know if this happened to anyone.