/etc/env.d/05gcc was config protected. The current config protect code needs to be ripped out and replaced with a regular expression engine.
Actually this was another bug in the Portage code. Fixed in 2.0.18 (/etc/env.d hard-coded again)