Hello.
Instead of revalidate(), can you invoke validate() on the layout object and let me know if it worked.

Syed.