Fixing accordion rendering issue

The number used for the sub-accordions wasn't always unique, so instead
using the number that is found per page