properly handle named expressions.