Fix infer dotted cases when there are constraints on the dbound.

Closes PR 14593.