Making compound constraints work