add test that we don't reuse element ids (related to #2096)