Fix for #118

Added a boundary check to determine the propagateDef flag