Improved check to decide if to add chain/residue.

Together with the latest TNG library updates this
fixes #1507

Change-Id: Iea7160cc1194fc398f9c4db0cc66f4bd43ce724a