Server: deal better with changing page structure.

@jagtalon This fixes your issue, but considering the source of the problem, I am pretty sure you're still not going to like the result.