Fix empty references in instances.