Clear frame name when duplicating it for a class body. Fixes #1402