Conflict Generalisation in ASP: Learning Correct and Effective Non-Ground Constraints