There is no check to restrict this for text/plain type. Your comment mentions this is only required in this specific case