I vaguely remember this being an issue with edgecase handling in getenv(3) on FreeBSD.