module replace - report changed only if contents is changed

Substitution report change even when contents is the same. This patch compare contents for change detection.