g10: Make sure some functions are passed a primary key.