fix cache layout version calculation for distribution.