Add test for endpoint global logic

This didn't make sense to me at first, but for a number of reasons
(noted in the comments) we can't change this behavior just yet.
Otherwise this would be a breaking change to the CLI.  I think there's
probably a better way to do this, but for now leaving things as is.  I
did add a test that documents this behavior though, so hopefully
others don't hit this code and wonder what's going on.