Only clear matches on new match so nested regex comparisons work correctly

Also add some useful debug output