Fix func replacements and delay slots on arm.

Fixes #6303.
Merge pull request #6375 from unknownbrackets/replace-fix

Fix func replacements and delay slots on arm