Merge pull request #444 from dean0x7d/inherit-dynamic-attr

Fix dynamic attribute inheritance in C++