Merge pull request #78 from AngryLawyer/master

Correctly filter out unused keynums in wrap_key. Fixes #57