Fix rendering of large portals

Fixes issue #1009