bugfix in entity scope correction code.
bugfix in entity scope correction code.

stopfstedt/ilios,justinchu17/ilios,justinchu17/ilios,ilios/ilios,dartajax/ilios,dartajax/ilios,Trott/ilios,justinchu17/ilios,stopfstedt/ilios,justinchu17/ilios,Trott/ilios,thecoolestguy/ilios,thecoolestguy/ilios,ilios/ilios