Fix issue with @addRequiredIndex annotations, thanks to @BlueAcorn