Enable legacy implementation of perform if safe

This should solve the remaining test failures