WP-4614: Remove duplicate code.