ID 249882 - Layers / Channels used only in expressions are not saved correctly in the Nuke script

Follow

Problem summary
Layers / Channels used only in expressions are not saved correctly in the Nuke script

Customer reported version
nuke.10.0v3

Customer reported platform
windows7

Steps to reproduce

1) Open Nuke

2) Create a CheckerBoard node

3) Attach a Shuffle node

4) Create two new layers findme1 and findme2, with the four default channels each, and shuffle the RGBA values into findme1 

5) Attach and expression node, and set the red channel to findme2.red, the result should turn cyan colour.

6) Save the Nuke script, and reopen it, it will error saying "ERROR: Expression1.expr0: Nothing is named 'findme2.red'". 

Workaround
Open the Nuke script in a text editor and add the layer manually, with the line:

add_layer {findme2 findme2.red findme2.green findme2.blue findme2.alpha}
Or add another node which uses those layers, but doesn't effect them in any way, such as an Expression node

Reproduced by support
This problem has been reproduced on:
Nuke 10.5v1 - Windows 10 - CentOS 6.8
Nuke 10.0v5 - Windows 10
Nuke 10.0v1 - Windows 10
Nuke 9.0v9 - Windows 10
Nuke 9.0v1 - Windows 10
Nuke 8.0v6 - Windows 10 - CentOS 6.8

Expected behaviour
For Nuke to save all the layers / channels used in a Nuke script

Actual behaviour
They weren't

    We're sorry to hear that

    Please tell us why