Catch script match failures.
Fix failure with regex include/exclude rules.

Fixes #1692