Cache variable in New-UDSelect Option block

I’m trying to work with vCenter to pull back some tags and add to a UDSelect, however it seems like I can’t reference a cache: variable inside the Option Block.

I was looking to do something like this:

New-UDSelect -Id 'ID_SYSTEMOWNER' -Label "System Owner" -Option {
            New-UDSelectOption -Name " " -Value ' '
            $null = Connect-VIServer -Server $Cache:ViServerList.Name -Session $Cache:ViServerList.SessionSecret
            $array_TagSystemOwners = Get-Tag -Category "Service Owner" | Sort-Object UserName | Sort-Object UserName
            foreach ($SystemOwner in $array_TagSystemOwners) {
                New-UDSelectOption -Name $ -Value $

The vCenter connection stuff is pulled from the post here and works fine in Endpoint blocks but when trying to load my dashboard with the above code I get the error:

"Exception calling “Invoke” with “0” argument(s): "Exception calling “Invoke” with “0” argument(s): "Exception calling “Invoke” with “0” argument(s): “Cannot validate argument on parameter ‘Server’. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.”

Which seems to imply the cache: variable isn’t accessible within the Option block.

This Dashboard is IIS hosted if that makes a difference to how this might work.

Any pointers, or perhaps a workaround to this behaviour?