Vlürch wrote:does that mean Malayalam originally had only /k/?
It could be that it still does. It's not clear to me whether the other velar stops are separate phonemes yet or not. Tamil seems to only have /k/ as a phoneme although FWIU it also has either [g] or [h] or both as an allophone or allophones depending on the variety.
Random thing: my brother and me went to get pizzas from the local pizzeria last Sunday and while we were waiting, at one of the tables there was a group of people who spoke some language that we couldn't recognise with certainty but was obviously some Iranian language. It sounded more like Kurdish than anything else, but that impression could've been influenced by them looking so much like Kurds. Seems like at least the language couldn't have been Kurdish, though, because they definitely said [dær~d̪æɾ] a lot, but apparently it doesn't exist as a preposition in Kurdish like it does in Persian.
Der does exist in Kurmanji, both as a preposition and as a postposition, from what I can tell. It can also be a noun and is part of some fixed expressions (e.g. dan der 'to reveal').