LinkFactory: fix bug causing always using default action