Release 165 phalanx shadowing

Phalanx shadowing changes (backported from dev)

@Szumo @psychonaut