Its not illegal and actually states about filtering in the highway code. Always a good one to pull if an accident occurs as the insurance solicitors are out for an easy life and will easily roll over ref this.

Just be sensible, not too quick and be defensive and you'll be fine - if they try to pull out fist into window or swift kick wakes them up