Fix for nested objects where some are not primary keys

@tgoyne