WFCORE-76 read-resource recursive-depth has no effect when recursive=true

This is integration of WFLY-3705 from 8.x branch