Make layout download tracking more robust