Make metadata cache reading slightly more robust