fix bugs in highstate whitelist, add tests
Merge pull request #13693 from mgwilliams/highstate-whitelist

fix bugs in highstate whitelist, add tests