When you comment all the elements in a YAML mapping, you end up with
None instead of an empty mapping, which can have bad side effect when
handling multiple environemnents. Let's handle that by ignoring the
latest None value.
Change-Id: I77ffabeb8d4cd2886ef4f41351e42ebe487b5d4b
(cherry picked from commit 2a8ce0d065)