So, I’ve found the problem and decided to write this as a short howto: DSL: Get host objects in hostgroup with get_objects() and Array#filter (deep-dive into lambda expressions, functions and closures)
TL;DR - we need to bind mygroup into the function’s local scope, as otherwise it doesn’t know about it.
It doesn’t hurt that you keep your own function, since closures and function callbacks might not be your thing at all. This follows the developer’s possibilities into several programming languages, and is still a cool feature 
Cheers,
Michael