deal with empty module types and sub-type completion
tests for #3288