Moves testing of already used node and relationship identifier to the semantic checks