Merge "Fix rect shadow detection" into nyc-dev