This removes unnecessary code that thinks it needs to differentiate between SEF and non-SEF URLs. That is actually the job of the router and not of the URL-requesting extension. The router will automatically remove all query elements that are identical with a menu item. This removes that code.
Pathway
Since we are always setting $url, we don't have to create that as an empty string in the beginning.
The changes around line 80ff simply remove the unnecessary condition for SEF or non-SEF URLs.
Menu Module
As I wrote above, the router automatically removes URL parameters that are part of the menu item. Thus, this whole check is useless.
How to test
See behavior of mod_menu and the breadcrumbs in Joomla
Tested and looks fine.
I also take the blame for that crappy suffix code. Somehow I remember that didn't work back then properly but now it certainly works without issues when taken out.
@test Success
No changed menu links and breadcrumbs links before and after patch. All SEF and NON-SEF options tested.