Fix bug that caused the method to only return an answer if it found a
square root in first attempt.