Generate reference elements once, but recreate shown list also when changing tabs.