I have a factory which returns an object which I want to display in the front-end. There is some strange behaviour (to me at least) when I set a variable as follows: