REL-1811: Consolidated similar code in a new rule that can be used by different instruments.