Fix issue where Contribution Detail Reports wouldn't work in CiviCRM 5.41
@monish can you review this, I found that the problem was caused by https://github.com/civicrm/civicrm-core/commit/7164d1ad1c40a9e8c798162a51bd06265921e8d2#diff-69349f9499f95c3b2473ffc2206c9d04e1cabc149584862dfc7fc876810ee151 which was causing the hook to run twice, can you check this?