Problem: classes aren't respecting CLASS guidelines on _dup

Solution: fixed all _dup methods, also to handle out-of-mempory
correctly.