Improve logic to build actions for variant attributes