Even though Lil Za got busted for drug possession, the Biebs should apparently be thanking his good fortune…

…and that damn search warrant!

Because it seems that search warrant actually helped him avoid possible bigger trouble!

While cops were at his Calabasas pad looking for surveillance video from egg-gate, they apparently had to pass up a slew of drugs not-so cleverly hidden because the search warrant wouldn't allow them to investigate certain items!

There were supposedly two cookie jars filled with pot, while there were also four or five empty bottles of codeine used for sizzurp. Along with the codeine, the Biebs apparently had everyone's cups labeled for who was drinking his special concoction that includes his fave Pineapple Fanta! In fact, we hear there were also Fanta cans all over, but they were discolored likely due to the codeine.

Our little Canadian culprit cutie also apparently had swisher sweets cigars out for smoking his buddy Mary Jane, along with a room actually DEDICATED to puffing up! He supposedly had hookah pipes in there, but his friends reportedly flushed the more illicit items when police showed up!

And all that apparently didn't even matter because cops couldn't touch the hidden items. Since they were only there with a search warrant for the video equipment, tearing apart cookie jars would've exceeded the limits of the warrant.