How about copyKeyBytesIfNecessary