Rewrite the previous merger using reflective API. Now it should work for
all elements...