A German court has ruled that a man under investigation in the 2007 disappearance of British toddler Madeleine McCann is allowed to leave Germany, overturning one of the conditions under which he was released after serving a sentence in an unrelated case.