support for linking to alias when used in wrappers, fix #2877