Hackish fix for 97ae2d89 and parent.

A clean solution needs more investigation, but this will work for now.