Expand variables

Only expand variables in build mode.
That also means that build mode cannot update the current buildset