Mark live codes in struct/enum for dead-code pass

Types used inside live struct or enum are now marked live.

Fix #10956 and #10993.