CLDIDE-2067: fix NPEs in nonencoded factory builder