gc: handle invalid name in type switch

Fixes #1453.

R=ken2
CC=golang-dev
https://golang.org/cl/4125043
2 files changed