I've added a unit test to current behavior.
I've also discovered that replacements of non-commutative sub-expressions fails even on new implementation, see comment on diff of https://github.com/cdsousa/sympy/commit/99819d63ebae11fb75164c148f5080b43590c5d6.