Do not hold the GDI lock when the ABORTDOC procedure is called.