Ensure `cacheIndexOf` works correctly with boolean values.