anchor.diff:  {$WARNINGS OFF}
       { Check if we have a cached list of matching rules for this date's year }
   {$IFDEF SUPPORTS_GENERICS}
  -    if not FRulesByYear.TryGetValue(LYear, LCompiledList) then
  +    if not FRulesByYear.TryGetValue(AYear, Result) then
   {$ELSE}
  -    if not FRulesByYear.Find(Pointer(LYear), Pointer(LCompiledList)) then
  -{$ENDIF}
  -      LCompiledList := CompileRulesForYear(LYear);
  +    if not FRulesByYear.Find(Pointer(AYear), Pointer(Result)) then
  +{$ENDIF}
  +      Result := CompileRulesForYear(AYear);
   {$WARNINGS ON}
  -
  -    { Iterate over and search what we like. Do not stop on the first one obviously }
  -    for I := 0 to LCompiledList.Count - 1 do
  -    begin
  -      LCompResult := CompareDateTime(ADateTime,
  -        TCompiledRule(LCompiledList[I]).StartsOn);
  -
  -      if LCompResult >= 0 then
  -        Result := TCompiledRule(LCompiledList[I]);
  -    end;
     finally
   {$IFDEF SUPPORTS_MONITOR}
       MonitorExit(FRulesByYear);
   {$ELSE}
       FRulesByYearLock.Leave();
   {$ENDIF}
  +  end;
  +end;
  +
  +function TCompiledPeriod.FindMatchingRule(const ADateTime: TDateTime): TCompiledRule;
  +var
  +  LCompiledList: TList;
  +  I, LCompResult: Integer;
  +begin
  +  Result := nil;
  +
  +  LCompiledList := GetRulesForYear(YearOf(ADateTime));
  +
  +  { Iterate over and search what we like. Do not stop on the first one obviously }
  +  for I := 0 to LCompiledList.Count - 1 do
  +  begin
  +    LCompResult := CompareDateTime(ADateTime, TCompiledRule(LCompiledList[I]).StartsOn);
  +    if LCompResult >= 0 then
  +      Result := TCompiledRule(LCompiledList[I]);
     end;
   end;
   
  
positive.code: 
      { Compiles the Rules for a given year }
      function CompileRulesForYear(const AYear: Word): TList;  { TCompiledRule }
    public
      { Basic stuffs }
      constructor Create(const APeriod: PPeriod; const AFrom, AUntil: TDateTime);
  
negative.code:   inherited;
  end;
  
  function TCompiledPeriod.GetRulesForYear(const AYear: Word): TList;
  begin
    Result := nil;
  
    { Protect this part of the code since it may change internal structures over time }
  {$IFDEF SUPPORTS_MONITOR}
  