WFLY-2333 Fix infinite loop bug from previous patch

oops!