Make support for scoped repository a little bit more robust. Fixes #3752.
Authored by: cboos 2006-09-21
Parent: [r3756]
Child: [r3758]