Better error handling in ContractGenerator handler #1014
Do not fail contract selection query when dictionary fields are broken
(should help with #1014, follows d84601e292517, #569)