Fix missed optimization opportunity when analyzing cast of mul and select.