When a tileLayer is added or removed form a map, the _tileLayersNum property is appropriately updated but the _tileLayersToLoad is not.  It is not updated until resetView, but that is called after  the method _onTileLayerLoad is called.  Thus, if you add one tile layer the _tileLayersToLoad is zero and when _onTileLayerLoad is called the values is decremented to -1.
When a tileLayer is added or removed form a map, the _tileLayersNum property is appropriately updated but the _tileLayersToLoad is not.  It is not updated until resetView, but that is called after  the method _onTileLayerLoad is called.  Thus, if you add one tile layer the _tileLayersToLoad is zero and when _onTileLayerLoad is called the values is decremented to -1.

This in the end doesn't make a difference on the initial zoom level of a map because _onTileLayerLoad also checks to see if there is a background tile layer, which there is not until after a first zoom.  However, this seems to me a bug waiting to happen, thus the patch.

olafurr/Leaflet,pzdz/Leaflet,fillerwriter/Leaflet,gabrielpconceicao/frontend-asset-leaflet,CorainChicago/Leaflet,perliedman/Leaflet,northerneyes/Leaflet,frogcat/Leaflet,mediasuitenz/Leaflet,mourner/Leaflet,Ossehoht/Leaflet,stefanocudini/Leaflet,dhootha/Leaflet,CorainChicago/Leaflet,AndBicScadMedia/Leaflet,starsolaris/Leaflet,sisou/Leaflet,CloudMade/Leaflet,iamjonbradley/Leaflet,sisou/Leaflet,elfalem/Leaflet,tsantacruz/RotationalMarker,waeltken/Leaflet,akrzyzanowskino/TeamSE,andrewmartini/Leaflet,geoloep/Leaflet,CapeSepias/Leaflet,kjell/Leaflet,javimolla/Leaflet,fredericksilva/Leaflet,fillerwriter/Leaflet,sellonen/Leaflet,davidjb/Leaflet,MuellerMatthew/Leaflet,Srikanth4/Leaflet,pakro/Leaflet,huangsong/Leaflet,geoloep/Leaflet,fillerwriter/Leaflet,tbassett44/Leaflet,javimolla/Leaflet,alex2wong/Leaflet,frafra/ProntoSoccorsoLiguria,mourner/Leaflet,starsolaris/Leaflet,prashen/Leaflet,davidlukerice/Leaflet,tbassett44/Leaflet,huangsong/Leaflet,iOffice/Leaflet,snkashis/Leaflet,billybonz1/Leaflet,litnerdy/Leaflet,w8r/Leaflet,fab1an/Leaflet,nvoron23/Leaflet,tomnod/Leaflet,2gis/Leaflet,AndBicScadMedia/Leaflet,jmutua2015/Leaflet,Jakobud/Leaflet,dhootha/Leaflet,RLRR/Leaflet,MuellerMatthew/Leaflet,psicomante/Leaflet,dhootha/Leaflet,srdavis/leaflet-template,kumy/Leaflet,mbrukman/Leaflet,jblarsen/Leaflet,kumy/Leaflet,RyanHickman/Leaflet,fredericksilva/Leaflet,iamjonbradley/Leaflet,bbecquet/Leaflet,andrewmartini/Leaflet,javimolla/Leaflet,lee101/Leaflet,tormi/Leaflet,codeator/Leaflet,patrickarlt/Leaflet,AP-whitehat/Leaflet,Trufi/Leaflet,sambernet/Leaflet,nikhildhamsaniya/Leaflet,DrillingInfo/Leaflet,prashen/Leaflet,eriksjaastad/Leaflet,bolshoibooze/Leaflet,thalesfsp/Leaflet,frafra/ProntoSoccorsoLiguria,wrrnwng/Leaflet,brah/Leaflet,jaropolk2/Leaflet,msiadak/Leaflet,psicomante/Leaflet,RyanHickman/Leaflet,fab1an/Leaflet,pakro/Leaflet,Ubisense/Leaflet,mstahv/Leaflet,msiadak/Leaflet,akrzyzanowskino/TeamSE,msiadak/Leaflet,northerneyes/Leaflet,fab1an/Leaflet,Andrey-Pavlov/Leaflet,beni55/Leaflet,elkingtonmcb/Leaflet,AP-whitehat/Leaflet,wpf500/Leaflet,nycitt/Leaflet,RLRR/Leaflet,waeltken/Leaflet,devjoseluis/Leaflet,snkashis/Leaflet,twoubt/Leaflet,RyanHickman/Leaflet,wrrnwng/Leaflet,Mark-Wood/Leaflet,olafurr/Leaflet,Jakobud/Leaflet,jasonoverland/Leaflet,frogcat/Leaflet,elkingtonmcb/Leaflet,mstahv/Leaflet,devjoseluis/Leaflet,Andrey-Pavlov/Leaflet,wancharle/Leaflet,nycitt/Leaflet,pzdz/Leaflet,hyperknot/Leaflet,klaftertief/Leaflet,iamjonbradley/Leaflet,brunocasanova/frontend-asset-leaflet,wpf500/Leaflet,huangsong/Leaflet,sisou/Leaflet,brunocasanova/frontend-asset-leaflet,Fil/Leaflet,msokk/Leaflet,RobertoMalatesta/Leaflet,MuellerMatthew/Leaflet,iZucken/Leaflet,DrillingInfo/Leaflet,akrzyzanowskino/TeamSE,Srikanth4/Leaflet,alex2wong/Leaflet,tormi/Leaflet,psicomante/Leaflet,wancharle/Leaflet,caiiiycuk/Leaflet,webmechanicx/Leaflet,scaddenp/Leaflet,davidlukerice/Leaflet,beni55/Leaflet,hyperknot/Leaflet,thalesfsp/Leaflet,hyperknot/Leaflet,mediasuitenz/Leaflet,moklick/Leaflet,wpf500/Leaflet,jblarsen/Leaflet,sambernet/Leaflet,nkovacs/Leaflet,lizardtechblog/Leaflet,starsolaris/Leaflet,tormi/Leaflet,scaddenp/Leaflet,waeltken/Leaflet,taraszerebecki/Leaflet,Leaflet/Leaflet,RLRR/Leaflet,davojta/Leaflet,caiiiycuk/Leaflet,cmulders/Leaflet,olafurr/Leaflet,nvoron23/Leaflet,CapeSepias/Leaflet,ismyrnow/Leaflet,taraszerebecki/Leaflet,juliensoret/Leaflet,mediasuitenz/Leaflet,akauppi/Leaflet,jmutua2015/Leaflet,mbrukman/Leaflet,2gis/Leaflet,tomnod/Leaflet,RobertoMalatesta/Leaflet,CapeSepias/Leaflet,Ossehoht/Leaflet,Trufi/Leaflet,AndBicScadMedia/Leaflet,iOffice/Leaflet,gabrielpconceicao/frontend-asset-leaflet,brah/Leaflet,Fil/Leaflet,yohanboniface/Leaflet,pakro/Leaflet,eriksjaastad/Leaflet,webmechanicx/Leaflet,frogcat/Leaflet,thalesfsp/Leaflet,snkashis/Leaflet,yohanboniface/Leaflet,elfalem/Leaflet,bbecquet/Leaflet,jasonoverland/Leaflet,kjell/Leaflet,stefanocudini/Leaflet,danzel/Leaflet,nikhildhamsaniya/Leaflet,davidlukerice/Leaflet,sambernet/Leaflet,Neorth/Leaflet,brunocasanova/frontend-asset-leaflet,tyrasd/Leaflet,Jakobud/Leaflet,mbrukman/Leaflet,grahamthompson/Leaflet,iOffice/Leaflet,nathancahill/Leaflet,tomnod/Leaflet,geoloep/Leaflet,CorainChicago/Leaflet,webmechanicx/Leaflet,w8r/Leaflet,cmulders/Leaflet,nycitt/Leaflet,Ubisense/Leaflet,grahamthompson/Leaflet,iZucken/Leaflet,yohanboniface/Leaflet,brah/Leaflet,sellonen/Leaflet,litnerdy/Leaflet,stefanocudini/Leaflet,akauppi/Leaflet,jasonoverland/Leaflet,sellonen/Leaflet,beni55/Leaflet,kumy/Leaflet,cartant/Leaflet,nikhildhamsaniya/Leaflet,davojta/Leaflet,akauppi/Leaflet,Neorth/Leaflet,jblarsen/Leaflet,patrickarlt/Leaflet,Trufi/Leaflet,AP-whitehat/Leaflet,msokk/Leaflet,scaddenp/Leaflet,cartant/Leaflet,Srikanth4/Leaflet,rlugojr/Leaflet,rlugojr/Leaflet,andrewmartini/Leaflet,wrrnwng/Leaflet,juliensoret/Leaflet,prashen/Leaflet,bolshoibooze/Leaflet,tsantacruz/RotationalMarker,wancharle/Leaflet,alex2wong/Leaflet,tsantacruz/RotationalMarker,iZucken/Leaflet,bbecquet/Leaflet,davojta/Leaflet,gabrielpconceicao/frontend-asset-leaflet,taraszerebecki/Leaflet,Leaflet/Leaflet,grahamthompson/Leaflet,2gis/Leaflet,codeator/Leaflet,lee101/Leaflet,caiiiycuk/Leaflet,RobertoMalatesta/Leaflet,Leaflet/Leaflet,Ossehoht/Leaflet,che603000/Leaflet,w8r/Leaflet,billybonz1/Leaflet,che603000/Leaflet,Neorth/Leaflet,fredericksilva/Leaflet,Mark-Wood/Leaflet,eriksjaastad/Leaflet,mourner/Leaflet,cartant/Leaflet,nathancahill/Leaflet,mstahv/Leaflet,tbassett44/Leaflet,cmulders/Leaflet,bolshoibooze/Leaflet,elkingtonmcb/Leaflet,pzdz/Leaflet,klaftertief/Leaflet,lee101/Leaflet,elfalem/Leaflet,billybonz1/Leaflet,klaftertief/Leaflet,nkovacs/Leaflet,Fil/Leaflet,msokk/Leaflet,devjoseluis/Leaflet,azimux/Leaflet,codeator/Leaflet,litnerdy/Leaflet,rlugojr/Leaflet,twoubt/Leaflet,Ubisense/Leaflet,jmutua2015/Leaflet,nathancahill/Leaflet,Andrey-Pavlov/Leaflet,twoubt/Leaflet