A breakthrough by-election in the west raises difficult questions for both Labor and the Liberals.