Ah, it sounds like you're going to need to do a bunch of troubleshooting to determine your final fix for this.
The URL you see in the browsers is not what IIS sees, so this may be part of the issue.
I'm typing this out from memory, but a standard URL may look something like the following example.
However, in the background, what is seen and processed by DNN might be something closer to this:
So, you may want to add some debugging code to capture the raw and rendered values, then emit them to the log file. (I'm mentioning this method instead of debugging, because you'll probably need to do this in production.) This will help you know more about the values your app is seeing and what you're expecting.
Note: Sometimes a single new module could change everything on you without you realizing it. Keep your eyes open. :)