Make version-specific URI parsing more robust