function addTileToLookup(tilesByZ, tile, z) {
  if (!(z in tilesByZ)) {
    tilesByZ[z] = new Set([tile]);
    return true;
  }
  const set = tilesByZ[z];
  const existing = set.has(tile);
  if (!existing) {
    set.add(tile);
  }
  return !existing;
}
Add a tile to the lookup.
@param {TileLookup} tilesByZ Lookup of tiles by zoom level.
@param {import("../../Tile.js").default} tile A tile.
@param {number} z The zoom level.
@return {boolean} The tile was added to the lookup.