Merged back from upstream. Fixed bug when requiring missing file.