Merge "Fix crash from exceeding the number of permissible registered listeners" into main