Checking for WritableContainer instance just before trying to add a reference.