rearrange to make reason for if clear. Fixes #911. R=agl1 CC=golang-dev https://golang.org/cl/1774044