! Don't use the same ID for multiple elements (fixes #2450)

Note that this is still a work in progress. I have verified that it works for the instances mentioned in #2450, but have not verified if it's a problem anywhere else yet. I need to make sure this doesn't break anything else before it gets pulled in.

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>