Fix the mechanism for working out whether the EAV tables are ready (they are created by migrations so not guaranteed to be available).