Test for cyclic type declaration handling in TypeDescriptor

Issue: SPR-9735
(cherry picked from commit 7fa3e65)
Polishing
(cherry picked from commit acefd83)