Fix check for encapsulated value end delimiter.

The vtkDICOMCompiler (which writes files) was incorrectly checking
for end of the sequence: it was long at the length, rather than at
the tag.