Ensure node input/outputs are consistent for nodes upon Layer instantiation
This avoids issues where nodes are added at Layer instantiation but the inputs and outputs are not defined correctly. There's no reason we shouldn't handle this case in exactly the same way as when we add nodes after instantiation.