Fixed panic when trying to dump funcs that are unexported struct fields.

Added test for it.