Issue #3086845 by jonathan1055, smustgrave: Module constraint checks fail incorrectly due to str_replace
mentioned in commit cc05ac89
mentioned in commit d9ef1091