Fixed bug with finding the next free Delcom device name (i.e. Delcom Device ##) which got stuck in an infinite loop.

(cherry picked from commit de56feded5f0760198320989b94cb4dc8b8cd7e9)