fpm will currently try to build packages with duplicate module definitions which can lead to cryptic compiler messages or erroneous compilation. It should be quite easy to detect duplicate modules and give an error message to the user. I would suggest a new subroutine e.g. check_modules invoked right before the end of build_model.