More robust ConcatExpr.as_py().

Don't fail on NullExpr parts in the concatenation, just skip them
instead.
Add missing SCOPE_SETTING block to _scope_is_directly_for().
Fix incorrect resolution of inheritable properties.

It is possible to set e.g.  a per-target property on module level, to be
shared by all child targets.  This was done including type normalization
etc., as it should.  Unfortunately, the same code was used to resolve
references to variables too.  This was wrong, this shouldn't be
possible.

Split ModelPart.get_prop() into two methods, one for each of the two
different purposes.