Ran into this today and I'd have sworn I knew how it worked.
set -e f() { false; echo "still here"; } f || echo failed
That prints "still here". Because f is on the left of ||, errexit is turned off for everything inside it, however deep. It isn't something you can turn back on inside f. Same for if f; then, and for &&.
Also: local x=$(false) # exit status is local's, so 0
Assign on a separate line. And add set -o pipefail or the first half of a pipeline can fail and you won't hear about it.