After some googling I now understand your problem. Seems like there is no other way to achieve what you need.

It only misses a unit test though.