So in an attempt to improve chances of people finding the right answer when searching for the incorrect key kLSSharedFileListItemHidden, here is the relevant snippet again:
NSDictionary *properties =
[NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES]
// NOTE, notice the key name:
forKey:@"com.apple.loginitem.HideOnLaunch"];
LSSharedFileListItemRef itemRef =
LSSharedFileListInsertItemURL(loginItemsListRef,
kLSSharedFileListItemLast,
NULL,
NULL,
(CFURLRef)bundleURL,
(CFDictionaryRef)properties,
NULL);
...