#5729 Added missing handling of constraints