Check for insertion of tags of the wrong type in lists