Ensure classes are merged when using proc wrappers