update _xmodule_recurse method