Thanks Argent77! After asking you for so much advice I finally get to contribute something in return!
Your updated version seems good to me, I would certainly suggest Wisp to include it in the next WeiDU release. Does %WNL% suffice for all operating systems? I keep using [%LNL%%MNL%%WNL%] just in case.
I've got a couple minor suggestions to the function, mostly "convenience" suggestions for beginners:
1. If %find_bound% is changed by the user then it can mess up the if/for "depth" detection so I suggest just placing it above the INNER_PATCH_SAVE new_block "%new_block%" line so it doesn't become changeable by the user.
2. %replaced_ui_block% should be set to 0 at the beginning of the function so it overrides whatever the user sets.
3. I would place an "EVAL" before %find_block% in the example code, even if there are no variables set in the example. I make this mistake *all the time* of forgetting to place "EVAL" where it should be placed.