Allow empty string IDs in getStructKey

extractKeys can do incomplete checking. Thus, it should be the only one
doing the checking instead of having other functions also enforce it.

Reverts part of a689b30a57812c1cfac51e9dfec7a7cf47e4b390