Fix the lookup of some ctors in exception.c. Fixes #10774.