Never, the HS40 always had the round ports and the HS50 had the larger ports like your pic above in post #4. , Square shrouds are a direct swap part so someone just swapped those out if its stamped that way.
The exhaust ports are very different between the 2 engines as well, even though they are both round. HS50s are larger and are situated differently between the mount holes making the flanges different between the 4 and 5hp's.