I can't reproduce your problem. Target weld works for me when I do what your are doing above. I do however have a script that delete zero area faces. Just select the objects you want to run it on, and drag the script from Windows Explorer into the viewport.…
Thanks a lot for the script! Apparently, I don't understand how the target weld works. I just applied the Reset XForm modifier to object from the first screenshot, and now target weld just won't connect vertices at all. Is it somehow depends on coordinates?