Upsert location middleware if path has been updated, fixes #23