[core] fix intertwined bugs concerning switches between regex rules and graph rules (the transition is a mess)