Fix handling of unknown class types

We don't need to success here. We also shouldn't break out
of the loop.