Fix generator for server codec with typedef return values