Factor out the 'key fields without link_id' logic from document
Also make sure the to-be-removed is present before removing it when
doing the field reordening.
Patch by: Sverre Rabbelier
from django.dispatch import Signaltemplate_rendered = Signal(providing_args=["template", "context"])