Fix issues with scope.match() and scope.find()
Add tests.