quartz: Add missing calls to EndFlush.