Well, I have moved the offending stuff closer to the jsf root... and it works.
So it seems when you nest stuff a bit too much things get all broken up in strange ways. Now I will try to isolate what exactly is the problem here.
I guess tabPanel could be the thing making trouble...
edit: could I set up the tabPanel so that it would switch to another page on click? and I just include a template with tabpanel on top... instead of including all pages inside the tabPanel.