Allow for there to have been no key set. Refs #6824
Merge branch 'bugfix/6824_gittest_fix' into develop