make changes line hook more backwards compatible

- although we intend to backport patch to core,
in case some code or stuff is cached or whatever,
this makes things not fail.

Change-Id: I04d702dfb55280fab4f05be5c292d1ea7db9586c
Merge "make changes line hook more backwards compatible"