This issue was solved with changeset r34620.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
lib/ostruct.rb: Create getters and setters after dup.
[Bug #6028] [rubyspecs:0380bcc]