This builds on my previous proposal, which was too wide in scope, and drops "empty units" from its scope, to retain the wildcard effect of variables with empty unit string.
In effect, we have to replace "expression containing only literal constants" with "expression containing only literal constants and mathematical operations".
This deals with distinguishing between exp(...)
and specificEnthalpy(...,...)
situations.
This is a minimal-diff change. If agreeable, I propose a behaviour-neutral refactoring below (BB2b) that is a bit larger but makes the structure clearer.
Updated rule 1: