Let render loop be more tolerant wrt when markDirty is called.

Change-Id: I95f1d6fe4695a09b1b6ccaf026137dabc22ec82c
Reviewed-by: Michael Brasser <michael.brasser@live.com>