Hotfix 452

Add a check when cycling through the bag-queries to bail out if you've found a match using a string with a wildcard.

I also made another fix - when an object is a wrong type and there is no converter template, the string got discarded.

I also fixed some compilation errors.