statepool: re-use previous matrix or vector instances when computing auto-dependencies.