Hi Lars,
The problems come because you design your custom features in a not recommended way, none of the features I ship have this problem.
You are trying to take shortcuts and do too much of your feature inside the module control. You should not link back to the cms page that contains the module control with extra parameters in the query string and then do dynamic things inside your module control based on those parameters. What if a page has multiple features on it and they all want to do that it will be a big mess with each one stepping on the other one by changing the url parameters. It goes against the grain of the system to design features this way and leads to such problems as you describe.
Instead you should follow the recommended way of implementing supporting pages and then you link to your supporting pages instead of back to the cms page and you pass the pageid and module id as params to your supporting page in addition to any custom params of your own and the menu will stay highlighted. This approach is also better for SEO because you the canonical url for the cms page does not have any of your parameters so it won't be indexed correctly whereas with links to a supporting page google will crawl the link to the new url and you can specify your own canonical url in the head of the page.
You can implement some of your feature in a usercontrol and then embed that usercontrol inside the module usercontrol and then also embed it in a supporting page if you need to re-use similar functionality in both places. You will see we use this approach in some included features if you study the source code.
Hope that helps,
Joe