i don't think it much matters if you were to start the session earlier.
i think the problem lies with the xml output, (though i cant account for it working previously)
With menu.php, as it appears to be creating xml output. embedding this into your detail page always gave me a headers already sent error.
Using the spry dataset, you can filter the unfiltered xml document on the fly by passing in the detailid as a parameter on the detail page.
This certainly filters the xml output, i just hope you can use the dataset contents as you need them.
it's good for the grey matter !