Workaround for https://bugs.ruby-lang.org/issues/8182
Add copy support