Errors in inference in upgraded Julia version (1.6.3 vs. 1.7.3)

Minimum Working Example - see