Fix #13789: Don't throw when module === null. Close gh-1269.