You are right. changing the line:
DotNetNuke.Common.Globals.LinkClick(mylink, Me.PortalSettings.ActiveTab.TabID, -1)
to
DotNetNuke.Common.Globals.LinkClick(mylink, Me.PortalSettings.ActiveTab.TabID, -1,false)
will solve your problem. The DNN core was managing the track flag as true by default (It makes no sense to me)
I will include an option for this in the next release.