Small fixes and tweaks to better deal with cases of UIOP upgrade vs non-upgrade
This will create a new commit in order to revert the existing changes.