The debug/pe package assumes there are always 16 entries in DataDirectory in OptionalHeader32/64 (ref pe.go)
But that is not always the case, there could be less no of entries (PE signed linux kernel for example):
prashant@Pra-Work:~$ sudo pev /boot/vmlinuz-4.15.0-47-generic
Data-dictionary entries: 6
In such case, the parsing gives incorrect results.