Further analysis and tentative (works, but possibly not correct) patch over on Gentoo bugzilla, http://bugs.gentoo.org/show_bug.cgi?id=52374#c15 Thanks for the testcase Peter - I wouldn't have been able to narrow it down without that.