Fix a bug where PaddingEffect could create assertion errors.