Cherry pick of MCAgls fix
FYI @pkoppenb . Feel free to close this if you don't want it for Run 3. Cherry pick of !3550 (merged)
Edited by Mark Smith
FYI @pkoppenb . Feel free to close this if you don't want it for Run 3. Cherry pick of !3550 (merged)