Influence of the magnetic configuration on the vortex-lattice instability in Nb/permalloy bilayers