I verified that this change helped with WFLY-6283. Still need someone to code review the pull request though (Radim or Galder I think).