Improved support for referredElements