Fix three very silly bugs in ensureExecuted(). Improve comments.