Fix uninitialized memory reported by valgrind.
23dff2bd introduced a bug where it didn't copy the point data correctly for all the layers. Fixed that.
23dff2bd introduced a bug where it didn't copy the point data correctly for all the layers. Fixed that.