Fix replacement funcs in the interpreter.
Merge pull request #5984 from unknownbrackets/interp-fix

Fix replacement funcs in the interpreter