WFLY-1739 Certain methods unconditionally invokes itself and may cause infinit loop

Code cleanup.