bug fix for Reference CustomCompoundBondForce

CustomCompoundBondForce with more than one bond produced incorrect results on Reference platform.