Well, it is impossible to create a rule to cover all possible situations.Alternate version:
So the PCs got the treasure but the Skill challenge is not even half finished.
In that case you could rule that the chest exploded, with a some of its contents destroyed and a few surviving coins, but there is a case in the chest which survived. The case is locked, skill challenge continues.
The skill challenge system is there to help the DM create interesting non-combat encounters by giving them some structure. It is an aid, not the solution
