The code that restored collection flags after moving them didn't take into account
collection children. So the flag for the active collection was properly restored,
but all of its children would take on the exclude flag of the collection the active
collection was dragged into.
This fix works in my test cases, but I will say that I don't have a very strong
conception of the context of these changes, so they might be the wrong way to
approach this problem.