Fixed a problem with MBTiles.  The valid tile check introduced a couple of bugs.