Refactor and document inference of `Data` constraints better.