DRY out common.constraints a bit more

Change-Id: If8a71692b79e381036b34245e09697ac1009beca
Merge "DRY out common.constraints a bit more"