EZP-23397: minor DRY refactor