{
if (sequenceRef != null)
{
+ boolean rIsDs=sequenceRef.getDatasetSequence()==null,tIsDs=sequenceI.getDatasetSequence()==null;
if (sequenceRef != sequenceI
- && !sequenceRef.equals(sequenceI)
- && sequenceRef.getDatasetSequence() != sequenceI
+ && (rIsDs && !tIsDs && sequenceRef != sequenceI
.getDatasetSequence())
+ && (!rIsDs && tIsDs && sequenceRef.getDatasetSequence() != sequenceI)
+ && (!rIsDs && !tIsDs && sequenceRef.getDatasetSequence() != sequenceI
+ .getDatasetSequence())
+ && !sequenceRef.equals(sequenceI))
{
// if sequenceRef isn't intersecting with sequenceI
// throw away old mapping and reconstruct.