Fix #0017605: Regression issue with upgrade step 184

Background and comments / rational on this commit are in http://www.mantisbt.org/bugs/view.php?id=17605.
Converted to a switch statement - will run test cases over tomorrow as it's 2am atm