Keep scope of typedefs consistent