bin/extended-tests.py: fixed bug when using a prefix more than once