Avoid unnecessary dynamic database calls when fixing synchronized predicates with back-end Prolog compilers that don't support threads