Fix some invalid casts if certain element nesting occurs
Fix some invalid casts if certain element nesting occurs

JoshSchreuder/MigraDoc.Extensions,JoshSchreuder/MigraDoc.Extensions,JoshSchreuder/MigraDoc.Extensions