Clear the dirty flag before starting the render, not after. This shouldn't make...