I've also hit this issue. My case is running acceptance checks for the gitlab-hook plugin. The plugin submits the url to gitlab to be stored there, and it is one of the things I want to verify on acceptance tests.
I run them on TravisCI, and the only BUILD_* variables that are set there are
BUILD_DISPLAY_NAME='#1'
BUILD_ID='1'
BUILD_NUMBER='1'
BUILD_TAG='jenkins-multiscm_master-1'
Edit: most of the projects are created by the plugin from other projects, and the config.xml I setup before firing the jenkins instance can be seen at github repo
Jenkins currently looks at the explicitly configured location information, and if that doesn't exist, it tries to use the current StaplerRequest. In the case of a job using the variables, there is no StaplerRequest, so there is no fallback to getting this information.