Fixed regression from ffc37e2343a93cf6d44247e20cd263b41f931716.

This (hopefully) ensures that the cache are created the same way as before
the offending commit.