Fix #774: Build system support for models in subdirectories