fix Module restriction from Extensible, simplify code, improved guard