I'm pretty sure there must be a place where you have $_SERVER["PHP_SELF"] that needs to be updated to $_SERVER["REQUEST_URI"]
You would have to investigate the code where the link is being built and go from there. Shoot me an IM in skype and I'll help you debug it.