Small refactoring of typemap creation.