One relatively simple solution is to add a local definition for the expression on which case analysis is performed