Fix bug affecting models with the same name in different apps