[BUG] handle link references to HEAD