Fix initialize struct formatting

We had an issue with indenting when initializing a struct inside an anonymous function.
- added a test