In some cases axis values can "pass through" a variable composite. Most likely a global axis. It should be possible to optimize this.
This is how @behdad does it: https://github.com/googlefonts/varc-rcjk/blob/cf5ce09f6c91a7c153279f6800b5f57abc1a5676/component.py#L61-L75