The left-wing firebrand has made winning Westminster by-elections a speciality - but has tasted less success in Scotland.