Merge "Fix a couple of issues with cleanupInvalidDbKeys.php maint script"