We needed to make a change to pam_env.so to prevent it from treating everything after a "#" in /etc/environment as a comment (unless the "#" is the first character in the line), since there is no way to escape a "#" character. We therefore applied an additional patch to the Debian sources. 1.1.8-3.1+deb8u2 is for Jessie, 1.1.8-3.6 is for Stretch and 1.3.1-5 is for Buster.