[#2413] Generate global object references, too