@Alain you got it right, in 4.1+ instead of $query->tax_query->queries being purely an array of arrays, it has one item of type string, in my case “AND”. Not a good design in my opinion. Type checking inside the foreach loop may be enough to prevent the notice being fired.
@Tom it shouldn’t be related to PHP versions but rather in your previous server the error reporting was set to Off and in the new one all notices are exposed. If your site is live I’d suggest you to turn error reporting off for good measure.