WIP - Fix named yield setTemplate check.

- Previously, I scheduled the yield check in an afterFlush callback.
- But if we were already in a flush, that would cause the function to be run as
  soon as all the currently flushing computations were recomputed.
- This would cause the afterFlush callback to be called before the next tick,
  and before the layout and template computations were recomputed, which is not
  what we want.
- There might be a more elegant approach, but this works.