Prosecutors were 'wrong' not to prosecute former Dundee United player David Goodwillie for rape, a court has heard.