Please keep empty lines in place when modifying files with -f option - such lines are added only by human.
I just fixed this and released it in 2.1.23. commit 5a7460f9b0d72bc48156455d07c5b4c621952d72 Author: Mike Pagano <mpagano@gentoo.org> Date: Mon Feb 27 15:16:54 2017 -0500 app-portage/portpeek: Stop removing blank lines. Fixes bug #610734. Removed unneeded code. Package-Manager: Portage-2.3.3, Repoman-2.3.1