Fix reflection for models with multiple primary keys.