IVGCVSW-6634 SubgraphView: Add method of returning a GetSubgraphWorkingCopy

 * Add pointer to SubgraphView allowing it to store a working copy
   implementation of its own representation of graph.
 * Make SubgraphView a friend of Graph to allow access to layers.
 * Add constructor to SubgraphView taking SubgraphViewWorkingCopyPtr
 * Rewrite Graph::SubstituteSubgraph for use on SubgraphView
 * Add GetWorkingCopy() method
 * Add tests for replacement of multiplication with DepthwiseConv2d
 * Check GetBackendHint() has value before passing to PrecompiledLayer
 * Add GetOwningIConnectableLayer to IInputSlot to allow traversing from
   IConnectableLayer->IOutputSlot->IInputSlot->IConnectableLayer

Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Change-Id: Iaaef14448d8b73867eaee9d69f4f98d5d1bf171c
diff --git a/src/armnn/Network.cpp b/src/armnn/Network.cpp
index de60e11..8ec8b42 100644
--- a/src/armnn/Network.cpp
+++ b/src/armnn/Network.cpp
@@ -2857,7 +2857,7 @@
     {
         layer->SetBackendId(backend.value());
     }
-    else
+    else if (layer->GetBackendHint().has_value())
     {
         layer->SetBackendId(layer->GetBackendHint().value());
     }