Always use local IDs at the database level. Fixes #150.