The same "off by one" issue was already present in RFC 3548 (obsoleted by RFC 4648). The archived article 315 has another author. Articles 316 and 319 are from the author noted in the RFCs, belong to a discussion of "web-safe base64" formats (incl. hex. + base32 alternatives), and specify the relevant base64 modification:

316 is shorter than 319, and nearer to the erroneous 315, so that was likely the intended article.

When fewer than 40 input bits
are available in an input group, bits with value zero are added (on
the right) to form an integral number of 5-bit groups.

It should say:

When fewer than 40 input bits
are available in an input group, bits with value zero are added (on
the right) to form an integral number of 8-bit groups.

Notes:

8-bit instead of 5-bit.
What follows the correction clearly shows that the final input group must be 8, 16, 24, 32 or 40 bit long, that is, a multiple of 8, not of 5.
Also examples of commonly-used Base32 encoders/decoders seem to show this behaviour.
Also, I would not say "When fewer than 40 input bits are available in an input group" but rather "When fewer than 40 input bits are available in the final input group", to better clarify and not to change the subject ambiguously, unless this is intentionally applicable to any input lot.