Make URI scope calculation work

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>