Backport ISPN-4117 from infinispan master to jdg-6.3.x branch.
Fixed in commit df4963da04315d1a5052557e8eaa3bbcb2f8b079