gc: bug306

Fixes #1040.

R=ken2
CC=golang-dev
https://golang.org/cl/2132047
5 files changed