GRIM: Reworked fi.lua.patchr to make it more slim
(cherry picked from commit 02ac8f4a6c64ee2fc9f6361b625ac1c48f3dd907)