Flush the icache before memcpys

This fixes #3110 as long as function replacements are on, at least the cases I reproduced.

-[Unknown]