Do not copy properties indiscriminately from `constraints`

Fixes #17250.