Ishmam uses rounded lips, which indicate dammah. For that reason, the ordinary rule permits it with a word-final consonant whose underlying vowel is dammah; it is not a way to indicate kasrah or fathah.
«نَسْتَعِينُ» — its original final dammah allows ishmam after making a valid stop.
«الْعَالَمِينَ» — its final vowel is kasrah: rawm may apply, but ishmam does not.
A further qualification concerns temporary vowels added for connected pronunciation. One must know the actual underlying word ending, not assume that every surface vowel allows a corresponding stopping technique. Rounded lips alone cannot establish permissibility.