Fix for #118

Added a boundary check to determine the propagateDef flag
Merge pull request #119 from malaverdiere/develop2

Fix for #118