Fix types_directive testcase to ensure the %types code is actually called and not just cast from one type to the other.