MODULES-1572 - Fix logic broken from MODULES-1309

Accidentally changed some behavior and broke things with the fix for
MODULES-1309