It does, but it is dependant on order of creation and other factors. Read this: Messages sent via "On Start" only reliable on partial deploy but not during " nodered.service" start. Possible? - #7 by Steve-Mcl
As I would expect. The function will not have received an input msg, so it does not exist. (On start is the start of it's life's time & has never received a message)