Compiler: Fixed low_inherit() updating parent flags.

The PROGRAM_{NEEDS,USES}_PARENT flags could be lost
in pass 2 of the compiler.

Also fixes a related issue when low_inherit() is
called by decode_value().