XCOMMONS-697: Safe XStream serializer implementation does not skip components that don't take the role from an interface

(cherry picked from commit 18a212d61202f6e1aab115f5b73c64acb0f8d545)