fix(manuscripts): fix hang upon filtering
See #582 (closed). The hang appears to result from over-zealous code optimization which was inlining the regex declaration inside the loop, meaning the regex was reset upon every iteration. I found that declaring the regex outside the function prevented this. I haven't yet found a setting to prevent the erroneous optimization.