Tax Rules with same priority different To_dates

I have tried to find in the code on github the logic for picking sales tax template for a given tax category if there are multiple Tax Rules for that Tax Category. Have not found yet. Trying to see how ERPnext would handle multiple Tax Rules with same priority, but different to_dates.

Our use case is that for a customer to have tax exempt status three different documents with 3 different expiration dates must be valid. Not sure how to implement with current tax rule structure.

ERPnext version 12