Add $allowReset option to registry::set function