A possible approach on #416.
slightly stricter about what is copied and what is not