Fixing an issue where the UIA/Robo testbases could get stuck due to an exception