Add unit test to reproduce the bug @marcovisona found