[ORD 2020R3/Connect 16] Configuration variable definition order per MsDebug

I am going through my debug file, and I'm still sorting out configuration variables.

In msconfig.cfg I see:

#----------------------------------------------------------------------
# Include the workset configuration file if _USTN_WORKSETNAME defined.
# _USTN_WORKSETNAME can be set by (in order of priority):
#       1) -ww command line option.
#       2) operating system environment variable.
#       3) configuration variable.
#----------------------------------------------------------------------
%level System
%if defined (_USTN_WORKSETNAME) && exists ($(_USTN_WORKSETSROOT)$(_USTN_WORKSETNAME).cfg)
  _USTN_WORKSETCFG = $(_USTN_WORKSETSROOT)$(_USTN_WORKSETNAME).cfg
%endif
#----------------------------------------------------------------------
#  iF _USTN_WORKSETCFG is not defined.
#  check if active configuration has "NoWorkSet.cfg"
#  if active configuration contains "NoWorkSet.cfg"  define it to _USTN_WORKSETCFG
#  else 
#  define _USTN_WORKSETCFG with the "NoWorkSet.cfg" present in the delivered configuration
#----------------------------------------------------------------------
%if !defined (_USTN_WORKSETCFG)
    %  if exists ($(_USTN_WORKSPACESROOT)NoWorkSpace/NoWorkSet.cfg)
        _USTN_WORKSETCFG : $(_USTN_WORKSPACESROOT)NoWorkSpace/NoWorkSet.cfg
    % else
        _USTN_WORKSETCFG : $(_USTN_INSTALLED_CONFIGURATION)WorkSpaces/NoWorkSpace/NoWorkSet.cfg
    % endif
  _USTN_HAVEWORKSET = 0
%else
  _USTN_HAVEWORKSET = 1
%endif

%if exists ($(_USTN_WORKSETCFG))
%  include $(_USTN_WORKSETCFG) level WorkSet
%endif

In my debug file, I see this:

(System): _USTN_WORKSETCFG=$(_USTN_WORKSETSROOT)$(_USTN_WORKSETNAME).cfg [M:\Bentley\ORD\Configuration\Worksets\.cfg]

This is very obviously not a viable workset cfg file. This faulty definition is confirmed in the summary of values at the bottom of the debug

_USTN_WORKSETCFG : System       = M:\Bentley\ORD\Configuration\Worksets\.cfg  
                 : Application  = (null)
                 : Organization = (null)
                 : WorkSpace    = (null)
                 : WorkSet      = (null)
                 : Role         = (null)
                 : User         = (null)

but back to the debug itself, directly following the definition of _USTN_WORKSETCFG, I see:

Processing macro file [M:\Bentley\ORD\Configuration\Worksets\21-XX_KyTest.cfg]

Which is indeed the proper workset configuration. _USTN_WORKSETNAME is indeed correctly defined at the user level

I also see several other "workset" variables defined in msconfig, but not adapting to any variables defined later in the process.

I feel very confused. Can someone help me understand whether variables that may not exist when msconfig.cfg is run can be defined later, and revise the variable as defined, or if I just need to explicitly define them all "at level" as I go through.

I had thought I might be able to use a pared down workset cfg by "predefining" a number of variables based on _USTN_WORKSETNAME and _USTN_WORKSETROOT, but I wonder if that variable is defined too late for the bulk of my definitions.