Better method for removing LP bonds.

The previous method didn't always work, since sometimes duplicate
bonds involving LP would be non-consecutive.  This modification
simply prevents LP bonds from being written in the first place,
rather than removing them after the fact.

Change-Id: Ifcfe8079669ac6baebaa376f25aa0888ffebc1e4