Users Teams are not listing in the detailed view

I am currently using SugarCRM Enterprise, Version 8.0.1 (Build 239) (Spring '18). In Users detailed view page under Access tab, I couldn't not able to see all users teams.

While debugging I found out that in src/modules/Users/User.php has a method get_my_teams which loops over the user teams. Which in turn call to a method \SugarBean::retrieve in my team module I have two relationships created_by_name and modified_by_name while calling `fill_in_relationship_fields` method I am facing the problem. The team loop gets called once and after that, it exits the loop.

Any suggestions without changing the source code would be helpful?

Thank You

Parithiban G