Refs #13993; added upgrade step; fix code to make it work