Fix issue with static-only unpickling raised in PR #252