[filter] fix problems with filtering multi-line log messages