[Bug 778662] $ORIGIN expansion does not work as expected