AFAIK, $node is not available in pagelayout templates when you're using viewcaching.
What I use in pagelayout templates (and it works with caching) is $module_result.node_id
If you do {$module_result|attribute(show)}, you'll find even more interesting variables. And if you really need the node itself, instead of just the ID, you can always do a fetch('content','node', hash(node_id, $module_result.node_id))
Thanks a lot for the tip. I don't know why it worked using $node_id in the previous version, but the $module_result was eactly what I needed to get it working in in 3.2-2.