Handle constant expressions in apply() and build().  Closes #36.