Consolidate and clean up tag reference transitions (fixes #1138)