Implement sequence based reference identifiers (fixes #3)