Move MatchRule detection
It currently reads it for every separate part, it only needs to happen once with the source input