Fix for issue #520

Fix for https://github.com/numba/numba/issues/520