Resolver function executed more than once

When working on migrating to serverless 3, I’ve noticed that our resolver function is now executed more than once. In some projects up to four times! Previously, it was never executed more than once.

custom:
  shared: ${file(../shared.config.js):promised}

Method itself is async.

module.exports.promised = async ({ resolveVariable }) => {
  ...
}

Edit:
Further investigations is that it seems related to using this variable from other included files, such as
${file(./serverless-stages.yaml):Source}