This is happening because in Debian /bin/sh is symlinked to dash not bash. And in /etc/profile provided by bash-me-up the line 28 is,
export -f pathremove pathprepend pathappend
In dash, which is a posix shell, there is no way to export a function. So the above line is like an alien to dash so it throws an error. And in /etc/X11/Xsession there is the line,
set -eThat ensures that the execution of the scripts halts on any error.
So the simplest of the solution to do would be to comment out the line,
# export -f pathremove pathprepend pathappend
In /etc/profile file.
Can you test this?