[PRD-4670]  Added a flag to prevent a recursive attempt to call paintImmediately() while repainting.