The async_types and abi_types flags really ought to use scope guards to prevent unreliable code gen in obscure cases.