Added test against aliasing and it looks good
Moved to more elegant recursive solution and patched test to fail properly