fixed issue with the base_module_model::_tree() method not working correctly with foriegn_keys