Fix a bug when type sections present in named types