Use $BASH_SOURCE to find location of emsdk_env.sh

$_ seems to be unreliable if the first command of my shell is to source the emsdk env script.

Bash source seems to be reliable though.
If you're referring to . vs source, no, this is deliberate elimination of a bashism - see the section for 'source' on the page I linked.

If you're on a debian/ubuntu variant you can see this by running dash, then trying to run . and source with no arguments in turn.