Use ao_ee_flush_internal while holding mutex