This is a common sentence construction in Danish & Norwegian. However, as you might imagine, rare instances occur which can be even more grammatically confusing, such as in the following sample conversation:

Person A: Der er et overflødigt ord i din tekst. ("There is a superfluous word in your text.")

Person B: Hvilket ord er det? ("Which word is that?")

Person A: Det 'det' der, i tredje linie. ("That 'that' there, in the third line.")

Person B: Det 'det' der? ("That 'that' there?", pointing.)

Person A: Nej, det der. ("No, that there.", pointing.)

Person B: Nååå, er det det 'det' det er? ("Ahh, I see, is it that 'that' which it is?")

I've added quote marks around the proper det, to indicate how to parse this curious sentence.

Any language will contain grammatical absurdities like this, because of the inherent property of language: that it can be self-referential.