I've included an example 40 kb .pdn file: http://www.crimson-imperium.org/files/bug.pdn
Open the file and examine layers. Layer 3 should be selected by default. Move it down once, and notice how layer 2 disappeared from the layer list. If you can't reproduce the bug, try a few more times. If you click on the space where the missing layer should be, the layer name and the visilbility check box will appear but the thumbnail will not. In case you can't even then reproduce the bug, this is how it looks.
http://img115.imageshack.us/img115/4112/untitled5mg1.png
In the marked spot should be the layer 2.
Tested on Paint.NET v2.5 (Beta 4 Release build 2.5.2115.35521) on multiple computers.