Fix #397: Prevent export of non-public classes and objects