Fix last modified time calculation of AssetReference (fixes #532, #537)

Fixes issues #532, #537. Properly calculates modified time of child assets.

More elegant solution than this #611 PR.