Issue #3319610 by acbramley, jcnventura: Access to recovery codes is denied depending on entity/database internals