[core] Factor out measure/layout calls into separate method