Portage uses newline-separated list to pass the profile path list to the bash code in ebuild.sh. This causes it to fail to properly pass them whenever any of them contains newline characters. Portage should instead support setting bash arrays in configuration environment (and then, in make.conf). This would add support for special characters in PORTDIR_OVERLAY too.