remove futile scan operations in poscaps and subrules.
teach the regex optimizer about LEVEL