Fixed an error in family trigger replacement.

Closes #333.
Merge pull request #334 from hjoliver/333-family-trigger-replacement

Fixed an error in family trigger replacement.