I have debugged jQuery ui and found the following:
After the element was created, jQuery ui is checking via anchor.href and location.href the link is local or not. This is a very failed implementation which causes bugs if base URL ist set and differ from location.