WP-1009. Rebased WP-1029