Fix restrict dangerous upgrade

Refs #1704