Modify the test for error reporting on nested invalid managed types to consider a case where more than two types are involved

+review REVIEW-5233