nir/linking: fix issue with two compact variables in a row. (v2)