Be a little more defensive with shared key retrieval