Fix incorrect selection of custom definitions.