Deep variables doesn't work with variableSyntax for double curly braces

I’m having some problems with deep variables coming from files, but only in combination with variableSyntax with double curly braces. Example:

test2.yml:

a: HELLO
b: WORLD

serverless.yml:

provider:
    variableSyntax: "\\${{([ ~:a-zA-Z0-9._\\'\",\\-\\/\\(\\)]+?)}}"
    ...
test1:
  a: HELLO
  b: WORLD
test2: ${{file(./test2.yml)}} # test1 and test2 should be identical
custom:
  val1: ${{self:test1.a}}
  val2: ${{self:test2.a}} 

$ sls print

test1:
  a: HELLO
  b: WORLD
test2:
  a: HELLO
  b: WORLD
custom:
  val1: HELLO
  val2: '${{deep:0}.a}'

If I run the same thing without variableSyntax, and replace all double curly braces with single curly braces, I get the expected result (both val1 and val2 resolve to “HELLO”).

How can I use double curly braces and still reference child variables of a map variable sourced from a file?