Correct detection of whether data-id-element is present