I think you'll need a bit more than this actually; CommCare 1.x case blocks have <user_id> as an inner node.

Also the earlier logic was also flawed; cases can be anywhere in the form, and this indeed happens regularly with subcases. I think it'd be more effective to try and get the user id from the meta block.