Replace class variable interim_apportioned_revenue with correctly allocated local variable, cleared at appropriate time.