The issue is you're not using things correctly. You should never call blocks directly from templates. Use regions in templates and add blocks to them from GUI, or you can expect IDs to get messed up. Block IDs are based on the order blocks are prepared for display (see implementation of drupal_html_id
function), and each time you mess up with the block display mechanism, and go around it, their numbers may change.
If you call block directly because you need to place a block in two places, see answers to Place a block in multiple regionsPlace a block in multiple regions question. Or, if it's a Views block, simply clone block display.
To reliably style a block, you can use Block Class module to assign a class that will not change the way ID does. Alternatively, you can use answers to How to add id to a blockHow to add id to a block to manually override IDs - just be careful to keep them unique if you want JavaScript to continue to work.
Note that not only IDs will get messed up when you call block directly, but also things like permissions and cache settings may get compromised.