prevent conversion unit to loop infinitly

When the UnitLiteral object is the base unit, then getAbsoluteFactor loops infinitely. To prevent this, we add a break condition in the while loop.