That was not correct indeed.

I amended the code to register only the top-level deployment unit after checking that it is part of a Weld deployment.