OK it seems there is a direct correlation between loading the samples and waveforms being drawn. If the sample was still in the process of loading while you executed setting the waveform in script, the waveform won't be updated. That's why the wait() helps. There's also a difference between regular HDDs and SSDs in this case - SSDs are faster so, it's obvious they'd probably work better in this case.
Actually last night I managed to make it not work for me too, but only in one particular case: after loading the NKI, go straight for Group 3. It wouldn't refresh the waveform. But if I selected ANY other group except group 3 after loading the NKI, it would update the waveform properly.
Then I moved the NKI to an SSD, and Group 3 changed waveform immediately after loading the NKI, so that was all fine!
It seems it would be great if purge_group() command were made async aware, so that we actually know when stuff is done loading, so that we can do GUI-related stuff that ties into sample loading (like showing waveforms) properly.