Unlike records, Kotlin data classes are mutable and so we can't apply the same constructor detection logic. Fixes gh-34500