I'm not thrilled with the assignment to __class__ in proxysubrepo in the second patch, but it was the simplest way to get things working. If that's really objectionable, I'm sure there are better ways to handle this case, but this seemed like the simplest way to go.