Fix typedef scoping resolution