Added warning when rendering during flush

Temporary fix to #821 until we make a final decision about rendering during flushing. I do think that render shouldn't be modifying any internal state in general, so this could just throw an error instead.