Currently we change permissions forwards and backwards for each instruction modified, instead we should only change permissions once per complete repatching event.
Created attachment 33291 [details] The Patch.
Fixed in r46247.