reworked instruction cache flush logic