As it would turn out, this was not due to the expression or the code handling the expression.
It was due to a <systemProperty key=”Label”/> that I had added to the XML file. This allows a developer to add a label to the widget, just like with Mendix input widgets.
Strangely enough, this was preventing the CurrentObject from being passed to the expression (or maybe it was entirely breaking the expression. Regardless, it stops working when the label is added). Somehow, the label must be changing the context of the widget or something. I have reported this bug to Mendix.
So simple, yet it took me like 2 months worth of weekends to find that. Lol.