Even if teach does finds the treasure all Luffy need to do is kick his butt and he'll take the thrown as king of the pirates Just like how Trafalgar Law said he would steal the throne instead of just gaining it himself.
Not to mention Teach is too lazy and probably too dumb to actually be able to find the treasure even after 2 years.