Fixes for dihedral numerics, and parameterlist logic.

Fixed a sign error in the dihedral rewrite, and improved the parameterlist
logic some more.