We recently encountered similar errors and DBA confirmed that it’s an issue with DI.
I looked closely to the DF which caused this problem, there is no MAX() queries joining. Only has distinct and xml nested mappings. ??? So why this is happening still?