The maximum population of Doydoys (20) is checked in the current generated world only. That means that if I had 20 Doydoys in my Shipwrecked world and brought one of them in the Volcano, it would count as if I had 1/20 in the Volcano and 19/20 in the Shipwrecked world. That way the maximum population of 20 can be exceeded by moving them between "worlds". This can be exploited to have up to 180 Doydoys in a single save file (20 in Shipwrecked + 20 in Volcano + 20 In Don't Starve + 60 in 3 Caves + 60 in 3 Ruins.)
Calculating Naughtiness will work the same way too. If I kill that one Doydoy in the Volcano, Krampus will spawn, even if there are still 19 other Doydoys in one of the islands.
Bring one Doydoy in the Volcano while multiple others are outside of it. Kill it. Watch Krampus spawn.