'Valid' nested Variable now being reported as deprecated - not clear what the new 'valid' version should be

Sorry if this is a dumb question, but I recently saw the following deprecation warning:

Serverless: Deprecation warning: Variables resolver reports following resolution errors:
              - Variable syntax error at "provider.stage": Invalid variable source at index 13 in "${opt:stage, '${env:SLS_STAGE, 'dev'}'}",

And I’m not sure what the correct new version should be, as I have:

provider:
  # ...
  stage: ${opt:stage, '${env:SLS_STAGE, 'dev'}'}

And that has been working until now, and still works but with the deprecation warning.

Could anyone shed any light on what change I should make? I tried removing the quotes around the ${env:SLS_STAGE, 'dev'} as follows:

provider:
  # ...
  stage: ${opt:stage, ${env:SLS_STAGE, 'dev'}}

But that flat out errored, so I’m not sure what else to try.

Ok, as is always the case, after playing with a few more permutations, I found the following to work:

${opt:stage, '${env:SLS_STAGE, "dev"}'}

(e.g. replace the nested single quotes around ‘dev’ with double quotes, I guess to not clash with the outer inner quotes). Makes sense in retrospect.