Leonard said he had been to Leshp before - that's why Vetinari suddenly realised there was another way to sort it and hurried back to him. Who else but Leonard would even think of building an underwater boat - had already started it and possibly even used it already before putting it into storage as Tony's just said.
Leonard designed the thing. It was already built or mostly so before Leshp resurfaced. Vetinari couldn't have already had it built on his own behalf, because at that stage he'd not even thought of, or knew about Leshp in a way that mattered. It must have been Leonard's and it's the reason he designed the rotten thing that's the key here. He'd been to Leshp before on it or else been motivated to build it at that point, because he already worked out that Leshp must only surface periodically.
Leonard designed the thing. It was already built or mostly so before Leshp resurfaced. Vetinari couldn't have already had it built on his own behalf, because at that stage he'd not even thought of, or knew about Leshp in a way that mattered. It must have been Leonard's and it's the reason he designed the rotten thing that's the key here. He'd been to Leshp before on it or else been motivated to build it at that point, because he already worked out that Leshp must only surface periodically.